<?php

namespace Database\Seeders;

use App\Models\Admin\SysRole;
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
use Illuminate\Database\Seeder;

class SysRoleSeeder extends Seeder
{
    /**
     * Run the database seeds.
     */
    public function run(): void
    {
        $roles = [
            [
                'name' => '管理员',
                'code' => 'ADMIN',
            ],
            [
                'name' => '开发',
                'code' => 'DEV'
            ],
            [
                'name' => '销售',
                'code' => 'SALE'
            ],
            [
                'name' => '售后',
                'code' => 'AFTER-SALE'
            ],
        ];

        foreach($roles as $role) {
            SysRole::create($role);
        }

    }
}
